home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------------*/
- /* The Opus Computer-Based Conversation System */
- /* (c) Copyright 1987, Wynn Wagner III, All Rights Reserved */
- /* */
- /* YOOHOO is a trademark of Wynn Wagner III */
- /* */
- /* YOOHOO-YOOHOO/2U2 is */
- /* Copyright 1987, Wynn Wagner III, All Rights Reserved */
- /* */
- /* This implementation of Chuck Forsberg's ZMODEM protocol was */
- /* for Opus by Rick Huebner */
- /* with modifications done by Vince Perriello */
- /* and more modifications done by Bob Hartman */
- /* */
- /* */
- /* BinkleyTerm "WaZOO" Processor */
- /* */
- /* */
- /* This module is a very simple FOSSIL-based terminal emulator. It is */
- /* provided for your information only. You will find routines that need */
- /* to be coded and identifiers to be resolved. It has been previously */
- /* known as "OpusLink" and "OConnect". The use of the name "BinkleyTerm" */
- /* does not preclude the possibility that another "OpusLink" or "OConnect" */
- /* could be released. */
- /* */
- /* There is absolutely no guarantee that anything here will work. If you */
- /* break this routine, you own both pieces. */
- /* */
- /* USAGE: You may use this material in any program with no obligation */
- /* as long as there is no charge for your program. For more */
- /* information about commercial use, contact the "OPUSinfo HERE" */
- /* BBS (124/111). */
- /* */
- /* */
- /*--------------------------------------------------------------------------*/
-
- #include <signal.h>
- #include <ctype.h>
- #include <conio.h>
-
- #define WAZOO_SECTION
- #define MATRIX_SECTION
- #include "zmodem.h"
-
- #include "com.h"
-
-
- extern int pascal send_WaZOO();
-
- extern int got_arcmail;
- extern int got_bundle;
- extern int un_attended;
-
- extern byte *request_template;
- extern int remote_capabilities;
- extern int remote_net, remote_node;
- extern int called_net, called_node;
-
- extern int get_Zmodem();
- extern int send_Zmodem();
- int (*wzgetfunc)(), (*wzsendfunc)();
-
-
-
- /*--------------------------------------------------------------------------*/
- /* WaZOO */
- /*--------------------------------------------------------------------------*/
- void WaZOO( originator )
- int originator;
- begin
- int stat;
- int wztype;
-
-
- /*--------------------------------------------------------------------*/
- /* Initialize WaZOO */
- /*--------------------------------------------------------------------*/
- stat =
- got_arcmail =
- got_bundle = 0;
-
- if (originator && ((remote_net != called_net) || (remote_node != called_node)))
- {
- status_line ("!Called %d/%d and got %d/%d", called_net, called_node,
- remote_net, remote_node);
- }
- else
- {
- called_net = remote_net;
- called_node = remote_node;
- }
-
- if (!CARRIER) return;
-
- /* See if we can both do ZEDZAP */
- if (remote_capabilities & ZED_ZAPPER)
- {
- wztype = ZED_ZAPPER;
- status_line(":WaZOO method: ZedZap");
- wzgetfunc = get_Zmodem;
- wzsendfunc = send_Zmodem;
- }
- else
- {
- wztype = Y_DIETIFNA;
- status_line(":WaZOO method: DietIfna");
- if (originator)
- {
- FTSC_sender(1);
- }
- else
- {
- FTSC_receiver(1);
- }
- return;
- }
-
-
- /*--------------------------------------------------------------------*/
- /* ORIGINATOR: send/receive/send */
- /*--------------------------------------------------------------------*/
- if (originator)
- begin
-
- send_WaZOO();
- if (!CARRIER) goto endwazoo;
- if (!(*wzgetfunc)(ctl.filepath, NULL)) goto endwazoo;
-
- if (!CARRIER) goto endwazoo;
- stat = respond_to_file_requests(0);
- (*wzsendfunc)(NULL,NULL,NOTHING_AFTER,((stat)?END_BATCH:NOTHING_TO_DO),DO_WAZOO);
- end
-
- /*--------------------------------------------------------------------*/
- /* CALLED SYSTEM: receive/send/receive */
- /*--------------------------------------------------------------------*/
- else
- begin
- if (!(*wzgetfunc)(ctl.filepath, NULL)) goto endwazoo;
- if (!CARRIER) goto endwazoo;
- send_WaZOO();
- if (!CARRIER) goto endwazoo;
- (*wzgetfunc)(ctl.filepath, NULL);
-
- end
-
- endwazoo:
- status_line ("*End of WaZOO Session");
-
- end /* wazoo */